package com.lvhx.beforstart;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;


/**
 * 实现接口ApplicationRunner或者CommandLineRunner
 * 都能在服务启动前运行特定代码
 */
@Slf4j
@Component
public class BeforStart implements CommandLineRunner {
    @Override
    public void run(String... args) throws Exception {
        log.info("@@@@@@@服务启动前先喝一杯@@@@@@@");
    }
}
